import request from '@/utils/request'


// 查验发票（加保存）
export function checkInvoice(data) {
  return request({
    url: '/api/v1/checkInvoice',
    method: 'post',
    data: data
  })
}

// 保存发票
export function SaveInvoice(data) {
  return request({
    url: '/api/v1/saveInvoice',
    method: 'post',
    data: data
  })
}

// 保存发票日志
export function SaveInvoiceLog(data) {
  return request({
    url: '/api/v1/invoicelog',
    method: 'post',
    data: data
  })
}

// 删除发票
export function delInvoice(invoId) {
  return request({
    url: '/api/v1/invoice/' + invoId,
    method: 'delete'
  })
}
// 查询发票列表
export function listInvoice(query) {
  return request({
    url: "/api/v1/invoiceList",
    method: "get",
    params: query
  });
}

// 查询发票详细
export function getInvoice(invoId) {
  return request({
    url: "/api/v1/invoice/" + invoId,
    method: "get"
  });
}
// 查询发票子项详细
export function getInvoiceSub(NumId) {
  return request({
    url: "/api/v1/invoiceSub",
    method: "get",
    params: NumId
  });
}
// 上传发票OCR图像
export function imageOcr(data) {
  return request({
    url: '/api/v1/imageOcr',
    method: 'post',
    data: data
  })
}



